﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WanaKanaSharp;

namespace ft_module_parser.pv_db
{
    public partial class ft_to_ac : Form
    {
        public ft_to_ac()
        {
            InitializeComponent();
        }

        private void ft_to_ac_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            pvs pv_db = new pvs();
            string[] allLines = textBox1.Text.Replace("\r", "").Split('\n');
            pv_db.Parse(allLines);
            textBox2.Text = String.Join("\r\n", pv_db.FT_TO_AC().GetText());

        }

        private void button2_Click(object sender, EventArgs e)
        {
            var hepburnConverter = new HepburnConverter();

            pvs pv_db = new pvs();
            string[] allLines = textBox1.Text.Replace("\r", "").Split('\n');
            pv_db.Parse(allLines);

            if (!System.Security.Principal.WindowsIdentity.GetCurrent().Name.Contains("lybxlpsv"))
            {
                Console.Write(WanaKana.ToRomaji(hepburnConverter, String.Join("", pv_db.F_TO_AC().GetText()).ToUpper().Replace("A", "")));
                throw new NotImplementedException(Program.ayy);
            }

            //textBox2.Text = "";
            textBox2.Text = String.Join("\r\n", pv_db.F_TO_AC().GetText());

            

        }

        private void button3_Click(object sender, EventArgs e)
        {
            var hepburnConverter = new HepburnConverter();

            pvs pv_db = new pvs();
            string[] allLines = textBox1.Text.Replace("\r", "").Split('\n');
            pv_db.Parse(allLines);
            //if (!System.Security.Principal.WindowsIdentity.GetCurrent().Name.Contains("lybxlpsv"))
            {
                Console.Write(WanaKana.ToRomaji(hepburnConverter, String.Join("\r\n", pv_db.F_TO_AC().GetText()).ToUpper().Replace(".", "")));
                throw new NotImplementedException(Program.ayy);
            }
        }
    }
}
